<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserRefundOrderInfoBusinTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_refund_order_info_busin', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->comment('用户ID');
            $table->integer('order_id')->comment('订单id');
            $table->string('order_number',255)->comment('订单号');
            $table->decimal('money',16,2)->comment('退款金额');
            $table->decimal('start_balance',16,2)->default(0.00)->comment('退款前余额');
            $table->decimal('last_balance',16,2)->default(0.00)->comment('退款后余额');
            $table->string('red_envelope_info',255)->default(0.00)->comment('红包变更信息');
            $table->string('remark',255)->default(0.00)->comment('退款备注');
            $table->tinyInteger('status',4)->default(0)->comment('状态');
            $table->integer('admin_id')->default(0)->comment('操作人id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('user_refund_order_info_busin');
    }
}
